<?php
//This controller handles updates.

session_start();

/**
 * Description of updates
 *
 * @author bilde
 */
class updates extends CI_Controller
{

	function  __construct()
        {
           parent::__construct();

           //Logged_in control
           if (!$this->session->userdata('is_logged_in'))
           {
                redirect('/welcome/index', 'refresh');
	   }
        }

        //Creates update by posting the input in the parameter.
        function index()
        {
            $this->model_updates->add_update($this->input->post('status'));
            redirect('socialbuddy/index', 'refresh');
	}

    
}
?>
